const express = require("express");
const {
    data
} = require("jquery");
const banner_data = require('./data/banner_data');
const other_data = require("./data/other_data");
const goods_data = require("./data/goods_data");
const {
    json
} = require("express");
// console.log(banner_data)
const app = express();
app.use(express.static('public'));
app.get("/banner", (req, res) => {
    // res.end('xxx')
    res.json(banner_data.bannerData)
})


app.get("/other", (req, res) => {
    // res.end('xxx')
    res.json(other_data)
})

app.get("/goods", (req, res) => {
    res.json(goods_data)
})


app.listen(8080, (err) => {
    if (!err) {
        console.log("SUCEED")
    } else {
        console.log("FLIED")
    }
})